package com.fastwire.carriere.user.entity;

import java.util.Date;
import java.util.List;

import com.fastwire.carriere.common.constant.UserConstants;
import com.fastwire.carriere.user.vo.PermissionVo;

public class UserSession {

	private long oid;
	private int version;
	private String status;
	private String userName;
	private Date loginDate;
	private Date logoutDate;

	private List<PermissionVo> permissions;

	public UserSession(String userName, List<PermissionVo> permissions) {
		super();

		this.status = UserConstants.STATUS_ACTIVE;
		this.userName = userName;
		this.loginDate = new Date();
		this.permissions = permissions;
	}

	public UserSession() {
		super();
		// TODO Auto-generated constructor stub
	}

	public long getOid() {
		return oid;
	}

	public void setOid(long oid) {
		this.oid = oid;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public List<PermissionVo> getPermissions() {
		return permissions;
	}

	public void setPermissions(List<PermissionVo> permissions) {
		this.permissions = permissions;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Date getLoginDate() {
		return loginDate;
	}

	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}

	public Date getLogoutDate() {
		return logoutDate;
	}

	public void setLogoutDate(Date logoutDate) {
		this.logoutDate = logoutDate;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

}
